package com.fr.report.cellElement;

import com.fr.base.core.ComparatorUtils;
import com.fr.base.xml.XMLPrintWriter;
import com.fr.base.xml.XMLableReader;
import com.fr.report.script.Calculator;

public class NormalPresent extends AbstractPresent
{
  private String value = null;

  public NormalPresent()
  {
  }

  public NormalPresent(Object paramObject)
  {
    this.value = paramObject.toString();
  }

  public void setNormalPresent(String paramString)
  {
    this.value = paramString;
  }

  public String getNormalPresent()
  {
    return this.value;
  }

  public Object present(Object paramObject, Calculator paramCalculator)
  {
    return this.value;
  }

  public boolean equals(Object paramObject)
  {
    return ((paramObject instanceof NormalPresent) && (ComparatorUtils.equals(this.value, ((NormalPresent)paramObject).value)));
  }

  public void readXML(XMLableReader paramXMLableReader)
  {
    if (paramXMLableReader.isAttr())
    {
      String str;
      if ((str = paramXMLableReader.getAttr("value")) != null)
        this.value = str;
    }
  }

  public void writeXML(XMLPrintWriter paramXMLPrintWriter)
  {
    if (this.value != null)
      paramXMLPrintWriter.startTAG("Normal").attr("value", this.value).end();
  }
}